<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3.html</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        li {
            width: 300px;
            height: 100px;
            float: left;
        }

        .clear {
            /* 只清除左浮动 */
            /* clear: left; */

            /* 不管左浮动还是右浮动，都可以清除浮动  */
            clear: both;
        }

        li:nth-child(1) {
            background-color: aqua;
        }

        li:nth-child(2) {
            background-color: blue;
        }

        li:nth-child(3) {
            background-color: brown;
        }
    </style>
</head>

<body>
    <ul class="list">

        <li>1</li>
        <li>2</li>
        <li>3</li>
        <div class="clear"></div>
    </ul>
    <h2>hello</h2>
</body>

</html>